package com.ruoyi.merchant.msg.Model;


import com.ruoyi.merchant.msg.app.AbstractAppMsg;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * 22.设置心率/血压测量周期（下行协议号：BP86，响应：AP86）
 * IWBP86, 353456789012345, 080835,1,720#
 * IW：标识符
 * BP86 : 命令字符
 * 353456789012345:IMEI号，设备唯一ID
 * 080835 :指令流水号
 * 0: 关闭测量；1 ：设置测量周期
 * 720: 表示720分
 *
 */
@Slf4j
@Data
public class BP89 extends AbstractAppMsg
{
    /**
     * 数据起封包
     */
    public String headCode = "IW";
    /**
     * 协议号
     */
    public final  String funCode = "BP89";
    /**
     * IMEI
     */
    private String imei;
    /**
     * 指令流水号
     */
    private String serialNnumber;
    /**
     * 心率低阀值，低于该阀值上传心率，如果未设置，则留空
     */
    private String heartRateLowThreshold;
    /**
     * 心率高阀值，高于该阀值上传心率，如果未设置，则留空
     */
    private String heartRateHightThreshold;
    /**
     * 低压阀值，低压低于该阀值上传血压，如果未设置，则留空
     */
    private String lowVoltageThresholdLow;
    /**
     * 低压阀值，低压高于该阀值上传血压，如果未设置，则留空
     */
    private String lowVoltageThresholdHight;
    /**
     * 高压阀值，高压低于该阀值上传血压，如果未设置，则留空
     */
    private String hightVoltageThresholdLow;
    /**
     * 高压阀值，高压高于该阀值上传血压，如果未设置，则留空
     */
    private String hightVoltageThresholdHight;
    /**
     * 结尾封包
     */
    public String footCode = "#";


     public BP89(){}



    @Override
    public  String toString(){
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append(this.headCode);
        stringBuffer.append(this.funCode);
        stringBuffer.append(",");
        stringBuffer.append(this.imei);
        stringBuffer.append(",");
        stringBuffer.append(this.serialNnumber);
        stringBuffer.append(",");
        stringBuffer.append(this.heartRateLowThreshold);
        stringBuffer.append(",");
        stringBuffer.append(this.heartRateHightThreshold);
        stringBuffer.append(",");
        stringBuffer.append(this.lowVoltageThresholdLow);
        stringBuffer.append(",");
        stringBuffer.append(this.lowVoltageThresholdHight);
        stringBuffer.append(",");
        stringBuffer.append(this.hightVoltageThresholdLow);
        stringBuffer.append(",");
        stringBuffer.append(this.hightVoltageThresholdHight);
        stringBuffer.append(this.footCode);
        return stringBuffer.toString();
    }

}




